home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Web Forms / Webs Forms.exe / pak / SETUP.RUL < prev   
Encoding:
Text File  |  1997-01-11  |  20.7 KB  |  589 lines

  1. /*----------------------------------------------------------------------------*\
  2.  *
  3.  *  IIIIIII SSSSSS
  4.  *    II    SS                          InstallShield (R)
  5.  *    II    SSSSSS          (c) 1990-1996, Stirling Technologies, Inc.
  6.  *    II        SS                     All Rights Reserved.
  7.  *  IIIIIII SSSSSS
  8.  *
  9.  *
  10.  *  This source code is intended as a supplement to InstallShield Corporation
  11.  *  product documentation.  Refer to your InstallShield Corporation
  12.  *  product documentation for more detailed information.
  13.  *
  14.  *
  15.  *    File Name:  SETUP.RUL
  16.  *
  17.  *  Description:  InstallShield SDK Edition Template One script.
  18.  *
  19.  *
  20.  *
  21.  *
  22.  *       Author:  InstallShield Corporation       Date:  1-10-96
  23.  *
  24.  *     Comments:  This template script performs a basic installation to a
  25.  *                Windows 95 or Windows NT platform.  The installation
  26.  *                includes components: Application Program Files, Sample and
  27.  *                Template Files, Online Help Files, and Multimedia Tutorial
  28.  *                Files.  With minor modifications, this template can be
  29.  *                adapted to create new, customized installations.
  30.  *
  31.  *                There maybe small differences between this script and the
  32.  *                script shown in the on-line User's Guide
  33.  *
  34.  *
  35. \*----------------------------------------------------------------------------*/
  36.  
  37.  
  38.  
  39. // Size of components.
  40. #define SIZE_REQ_SAMPLES          82000
  41. #define SIZE_REQ_TEMPLATES         2000
  42. #define SIZE_REQ_PROGRAM        1660000
  43.  
  44. #define APP_NAME                "CGI*Star_new"
  45. #define PROGRAM_GROUP_NAME      "WebGenie"
  46. #define APPBASE_PATH            "WebGenie\\"
  47. #define COMPANY_NAME            "WebGenie"
  48. #define PRODUCT_NAME            "CGI*Star"
  49. #define PRODUCT_VERSION         "2.2"
  50. #define PRODUCT_KEY             "cgistar.exe"
  51. #define UNINSTALL_KEY           "U_CGISTAR"
  52. #define APPBASE_DIR95           "Program Files"
  53. #define BASE_REGISTRYNT         "Software\\Microsoft\\Windows NT\\CurrentVersion\\App Paths\\"
  54. #define BASE_REGISTRY95         "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"
  55.  
  56. #define STR_COMPLETE95 "by selecting the program icon in the Programs menu.\n\n"
  57. #define STR_COMPLETENT "by selecting the program icon in the program group.\n\n"
  58.  
  59. declare
  60.  
  61.         // Global variable declarations.
  62.         STRING  svGrp, szMsg, szFileSet, szTitle, szAppPath, szAppSharedDir;
  63.         STRING  szProgram, szTemp, svUninstLogFile, szRegKey;
  64.         STRING  svMainDirectory[ _MAX_STRING ];
  65.         BOOL    bSpaceOk, bReshowSetupType;
  66.         NUMBER  nResult, nStatusId, nType;
  67.  
  68.         BOOL    bIncludeProgram, bIncludeSamples, bIncludeHelp;
  69.         BOOL    bWinNT, bShellExplorer;
  70.  
  71.         // Function declarations.
  72.         prototype SetupScreen();
  73.         prototype CheckRequirements();
  74.         prototype CheckSpaceRequirements( number, number, number, string );
  75.         prototype CreateRegDBEntries();
  76.  
  77. program
  78.  
  79. StartHere:
  80.         Disable( BACKGROUND );
  81.  
  82.         // Set up the installation screen.
  83.         SetupScreen();
  84.  
  85.         // Set installation info., which is required for registry entries.
  86.         InstallationInfo( COMPANY_NAME, PRODUCT_NAME, PRODUCT_VERSION, PRODUCT_KEY );
  87.  
  88. // Create a Welcome dialog.
  89. WelcomeDlg:
  90.         Disable( BACKBUTTON );
  91.         Welcome( "", 0 );
  92.         Enable( BACKBUTTON );
  93.  
  94.         // Test target system proper configuration.
  95.         CheckRequirements();
  96.  
  97.         // Ask user for a destination location for the installation.
  98. GetTargetDirectory:
  99.  
  100.         svMainDirectory = TARGETDISK ^ APPBASE_DIR95 ^ APPBASE_PATH;
  101.  
  102.         szMsg = "";
  103.         if ( AskDestPath( "", szMsg, svMainDirectory, 0 ) = BACK ) then
  104.            goto WelcomeDlg;
  105.         endif;
  106.  
  107.         szAppSharedDir = svMainDirectory ^ "System";
  108.  
  109.         nType = TYPICAL;
  110. DetermineUserSelection:
  111.  
  112.         nType = SetupType( "", "", svMainDirectory, nType, 0 );
  113.         if ( nType = BACK ) then goto GetTargetDirectory; endif;
  114.  
  115.         bReshowSetupType = FALSE;
  116.  
  117.         switch (nType)
  118.         case TYPICAL:
  119.              bIncludeSamples  = TRUE;
  120.              bIncludeProgram  = TRUE;
  121.              bIncludeHelp = TRUE;
  122.         case COMPACT:
  123.              bIncludeProgram  = TRUE;
  124.         case CUSTOM:
  125.              bIncludeSamples  = TRUE;
  126.              bIncludeProgram  = TRUE;
  127.              bIncludeHelp     = TRUE;
  128.              szMsg = "Select the components that you wish to install.\n"+
  129.                      "If the check box is unchecked, that component will not be "+
  130.                      "installed. Click Next to continue with the installation.";
  131.  
  132.              nResult = AskOptions( NONEXCLUSIVE, szMsg,
  133.                                    "Application Program Files", bIncludeProgram,
  134.                                    "Sample and Template Files", bIncludeSamples,
  135.                                    "On-Line Help Files", bIncludeHelp );
  136.  
  137.              if ( nResult = BACK ) then goto DetermineUserSelection; endif;
  138.  
  139.              // Handle user clicking Cancel button.
  140.              if (nResult = CANCEL) then
  141.                 if (AskYesNo( "Are you sure you would like to exit setup?", NO ) = YES) then
  142.                    abort;
  143.                 else
  144.                    bReshowSetupType = TRUE;
  145.                 endif;
  146.              endif;
  147.         endswitch;
  148.  
  149.         if (bReshowSetupType = TRUE) then goto DetermineUserSelection; endif;
  150.  
  151.         // Check to see if target system meets space requirements.
  152.         bSpaceOk = CheckSpaceRequirements( bIncludeSamples,
  153.                                            bIncludeProgram,
  154.                                            bIncludeHelp,
  155.                                            svMainDirectory );
  156.  
  157.         // Ask user to try again if not enough space available.
  158.         if (bSpaceOk = FALSE) then goto DetermineUserSelection; endif;
  159.  
  160. FolderSelection:
  161.         svGrp = PROGRAM_GROUP_NAME;
  162.  
  163.         // Allow user to modify folder name.
  164.         if ( SelectFolder( "", svGrp, svGrp ) = BACK ) then
  165.               goto DetermineUserSelection;
  166.         endif;
  167.  
  168. FileTransferSetup:
  169.  
  170.         // Prepare InstallShield to record deinstallation information.
  171.         DeinstallStart( svMainDirectory, svUninstLogFile, UNINSTALL_KEY, 0 );
  172.         RegDBSetItem( REGDB_UNINSTALL_NAME, APP_NAME );
  173.  
  174.         // Set registry App Paths key information for the main application.
  175.         szAppPath = svMainDirectory ^ "PROGRAM" + ";" + szAppSharedDir;
  176.         RegDBSetItem( REGDB_APPPATH, szAppPath );
  177.         szProgram = svMainDirectory ^ "cgistar.exe";
  178.         RegDBSetItem( REGDB_APPPATH_DEFAULT, szProgram );
  179.  
  180.         // Define the "General" file set.
  181.         szFileSet = "General";
  182.         TARGETDIR = svMainDirectory;
  183.  
  184.         FileSetBeginDefine( szFileSet );
  185.  
  186.           SetStatusWindow( -1, "Copying program files..." );
  187.  
  188.           // Always copy README & related files, located at
  189.           // the root level in the DATA.Z library file.
  190.           CompressGet( "data.z", "*.*", COMP_NORMAL );
  191.              bIncludeProgram  = TRUE;
  192. /*
  193.           if (bIncludeProgram) then
  194.              TARGETDIR = svMainDirectory ^ "PROGRAM";
  195.              CompressGet( "data.z", "program\\*.*", INCLUDE_SUBDIR );
  196.              CompressGet( "data.z", "shared\\*.*", COMP_NORMAL );
  197.              TARGETDIR = szAppSharedDir;
  198.              CompressGet( "data.z", "shared\\*.*", SHAREDFILE | COMP_NORMAL );
  199.           endif;
  200.  
  201.           if (bIncludeSamples) then
  202.              TARGETDIR = svMainDirectory ^ "SAMPLES";
  203.              CompressGet( "data.z", "samples\\*.*", INCLUDE_SUBDIR );
  204.           endif;
  205.  
  206.           if (bIncludeHelp) then
  207.              TARGETDIR = svMainDirectory ^ "TEMPLATE";
  208.              CompressGet( "data.z", "template\\*.*", INCLUDE_SUBDIR );
  209.           endif;
  210. */
  211.         FileSetEndDefine( szFileSet );
  212.  
  213. DoFileTransfer:
  214.         // Set up progress indicator and information gauge.
  215.         Enable( STATUSDLG );
  216.         StatusUpdate( ON, 90 );
  217.  
  218.         // Perform the file set.
  219.         nResult = FileSetPerformEz( szFileSet, 0 );
  220.  
  221.         switch (nResult)
  222.  
  223.         case FS_DONE: // Successful completion.
  224.  
  225.         case FS_CREATEDIR: // Create directory error.
  226.              MessageBox( "Unable to create a directory under " + TARGETDIR + "."+
  227.                          "Please check write access to this directory.", SEVERE );
  228.              abort;
  229.  
  230.         default: // Group all other errors under default label.
  231.              NumToStr( szTemp, nResult );
  232.              MessageBox( "General file transfer error."+
  233.                           "Please check your target location and try again."+
  234.                           "\n\n Error Number:"+szTemp, SEVERE );
  235.  
  236.              abort;
  237.         endswitch;
  238.  
  239. SetRegistryEntries:
  240.  
  241.         CreateRegDBEntries( );
  242.  
  243.         Delay(2);
  244.         Disable( STATUSDLG );
  245.  
  246.         // Create program groups (folders) and icons.
  247.  
  248. CreateFolderIcons:
  249.         SetStatusWindow( 95, "Creating Folder and Icons...." );
  250.  
  251.         CreateProgramFolder( svGrp );
  252.         ShowProgramFolder( svGrp, SW_SHOW );
  253.         LongPathToShortPath( svMainDirectory );
  254.         Delay(1);
  255.  
  256.  
  257.         TARGETDIR = svMainDirectory;
  258.  
  259.         if (bIncludeProgram) then
  260.            szProgram = TARGETDIR ^ "cgistar.exe";
  261.            if (bShellExplorer) then
  262.               LongPathToQuote( szProgram, TRUE );
  263.            else
  264.               LongPathToShortPath( szProgram );
  265.            endif;
  266.            AddFolderIcon( svGrp, "Example1",
  267.                           szProgram + TARGETDIR ^ "cgistar.exe",
  268.                           TARGETDIR ^ "PROGRAM",
  269.                           "", 0, "", REPLACE );
  270. /*
  271.            AddFolderIcon( svGrp, APP_NAME, szProgram,
  272.                           TARGETDIR ^ "PROGRAM",
  273.                           "", 0, "", REPLACE );
  274. */
  275.            Delay( 1 );
  276.         endif;
  277.  
  278.         if (bIncludeSamples) then
  279.            szProgram = TARGETDIR ^ "PROGRAM\\cgistar.exe";
  280.            if (bShellExplorer) then
  281.               LongPathToQuote( szProgram, TRUE );
  282.            else
  283.               LongPathToShortPath( szProgram );
  284.            endif;
  285.            AddFolderIcon( svGrp, "Example1",
  286.                           szProgram + TARGETDIR ^ "cgistar.exe",
  287.                           TARGETDIR ^ "PROGRAM",
  288.                           "", 0, "", REPLACE );
  289.            Delay( 1 );
  290.            AddFolderIcon( svGrp, "Example2",
  291.                           szProgram + TARGETDIR ^ "cgistar.exe",
  292.                           TARGETDIR ^ "PROGRAM",
  293.                           "", 0, "", REPLACE );
  294.            Delay( 1 );
  295.         endif;
  296.  
  297.         AddFolderIcon( svGrp, "ReadmeFile",
  298.                        "NOTEPAD.EXE " + TARGETDIR ^ "cgistar.txt",
  299.                        TARGETDIR,
  300.                        "", 0, "", REPLACE );
  301.         Delay( 1 );
  302.  
  303.  
  304.         if (!bShellExplorer) then
  305.            szProgram = WINDIR ^ "UNINST.EXE";
  306.            LongPathToShortPath( szProgram );
  307.            LongPathToShortPath( svUninstLogFile );
  308.            AddFolderIcon( svGrp, "unInstallShield",
  309.                           szProgram + " -f" + svUninstLogFile,
  310.                           WINDIR,
  311.                           "", 0, "", REPLACE );
  312.            Delay( 1 );
  313.         endif;
  314.  
  315.         // Announce setup complete and offer to read README file.
  316.  
  317.         SetStatusWindow( 100, "Installation complete." );
  318.  
  319.         // If shared files could not be installed, then users must restart system.
  320.         if (BATCH_INSTALL = TRUE) then
  321.            szMsg = "Some files could not be installed because they are "+
  322.                    "currently in use by other programs in the system.  "+
  323.                    "To allow for proper operation of the new program you should restart"+
  324.                    "your system at this time.";
  325.            CommitSharedFiles(0);
  326.            RebootDialog( "Restart Windows", szMsg, SYS_BOOTMACHINE );
  327.         else
  328.  
  329.            szMsg = "Setup is complete.  You may run the installed program ";
  330.            if ( !bShellExplorer ) then
  331.               szMsg = szMsg + STR_COMPLETENT;
  332.            else
  333.               szMsg = szMsg + STR_COMPLETE95;
  334.            endif;
  335.  
  336.            MessageBeep( 0 );
  337.            MessageBox( szMsg, INFORMATION );
  338.         endif;
  339.  
  340.         exit;
  341.  
  342.  
  343. /*---------------------------------------------------------------------------*\
  344.  *
  345.  * Function:  SetupScreen
  346.  *
  347.  *  Purpose:  This function will set up the screen look.  This includes
  348.  *            colors, fonts, text to be displayed, etc.
  349.  *
  350.  *
  351.  *    Input:
  352.  *
  353.  *  Returns:
  354.  *
  355.  * Comments:
  356. \*---------------------------------------------------------------------------*/
  357.  
  358. function SetupScreen()
  359.         begin
  360.  
  361.           Enable( INDVFILESTATUS );
  362.  
  363.           SetTitle( APP_NAME + " Setup", 28, WHITE );
  364.  
  365.           SetTitle( "Setup", 0, BACKGROUNDCAPTION ); // Caption bar text.
  366.  
  367.           Enable( BACKGROUND );
  368.  
  369.         end;
  370.  
  371.  
  372. /*---------------------------------------------------------------------------*\
  373.  *
  374.  * Function:  CheckRequirements
  375.  *
  376.  *  Purpose:  This function will check all minimum requirements for the
  377.  *            application being installed.  If any fail, then the user
  378.  *            is informed and the installation is terminated.
  379.  *
  380.  *
  381.  *    Input:
  382.  *
  383.  *  Returns:
  384.  *
  385.  * Comments:
  386. \*---------------------------------------------------------------------------*/
  387.  
  388. function CheckRequirements()
  389.           number  nvDx, nvDy;
  390.           number nvResult;
  391.           STRING szResult;
  392.           BOOL  bWin95;
  393.         begin
  394.  
  395.           bShellExplorer = FALSE;
  396.  
  397.           // Assume that IS is running on Windows 95
  398.           bWinNT         = FALSE;
  399.           bWin95         = TRUE;
  400.  
  401.           // Determine if target system uses NT or Windows 95.
  402.           GetSystemInfo( OS, nvResult, szResult );
  403.           if( nvResult = IS_WINDOWSNT ) then
  404.               bWinNT = TRUE;
  405.               bWin95 = FALSE;
  406.           endif;
  407.  
  408.           // Get OSMAJOR.  IF it is Greater than/Equal to 4 OR
  409.           // if operating system InstallShield is running on
  410.           // is Windows 95, the shell interface is being used.
  411.  
  412.           GetSystemInfo( OSMAJOR, nvResult, szResult );
  413.           if( ( nvResult >= 4 ) || ( bWin95 ) ) then
  414.                  bShellExplorer = TRUE;
  415.           endif;
  416.  
  417.           // Check screen resolution.
  418.           GetExtents( nvDx, nvDy );
  419.           if (nvDy < 480) then
  420.              MessageBox( "This program requires VGA or better resolution.", WARNING );
  421.              exit;
  422.           endif;
  423.  
  424.         end;
  425.  
  426. /*---------------------------------------------------------------------------*\
  427.  *
  428.  * Function:  CheckSpaceRequirements
  429.  *
  430.  *  Purpose:  This function will check space requirements based on the
  431.  *            elements being installed.
  432.  *
  433.  *    Input:
  434.  *
  435.  *  Returns:
  436.  *
  437.  * Comments:
  438. \*---------------------------------------------------------------------------*/
  439.  
  440. function CheckSpaceRequirements( bIncludeSamples,
  441.                                  bIncludeProgram,
  442.                                  bIncludeHelp,
  443.                                  szDir )
  444.           number  nSizeRequired;
  445.         begin
  446.  
  447.           nSizeRequired = 0;
  448.  
  449.           // Determine total size.
  450.           if (bIncludeSamples) then
  451.             nSizeRequired = nSizeRequired + SIZE_REQ_SAMPLES;
  452.           endif;
  453.  
  454.           if (bIncludeHelp) then
  455.             nSizeRequired = nSizeRequired + SIZE_REQ_TEMPLATES;
  456.           endif;
  457.  
  458.           if (bIncludeProgram) then
  459.             nSizeRequired = nSizeRequired + SIZE_REQ_PROGRAM;
  460.           endif;
  461.  
  462.           // Check space on target drive.
  463.           bSpaceOk = TRUE;
  464.           if (GetDiskSpace( szDir ) < nSizeRequired) then
  465.              szMsg = "There is not enough space available on the disk\n" +
  466.                      "'" + svMainDirectory + "' \n" +
  467.                      "Please free up some space or change the target location\n" +
  468.                      "to a different disk";
  469.              MessageBeep(0);
  470.              MessageBox( szMsg, WARNING );
  471.              bSpaceOk = FALSE;
  472.           endif;
  473.  
  474.           return bSpaceOk;
  475.         end;
  476.  
  477.  
  478. /*---------------------------------------------------------------------------*\
  479.  *
  480.  * Function:  CreateRegDBEntries
  481.  *
  482.  *  Purpose:  This function will create necessary keys and values for
  483.  *            the sample program.
  484.  *
  485.  *    Input:
  486.  *
  487.  *  Returns:
  488.  *
  489.  * Comments:
  490. \*---------------------------------------------------------------------------*/
  491.  
  492. function CreateRegDBEntries()
  493.         string szKey[255], szValue, szDemo, szProgram;
  494. begin
  495.  
  496.         RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
  497.  
  498.         // Create PRODUCT_KEY key.
  499.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  500.                 PRODUCT_VERSION + "\\" + "DESIGNER";
  501.         RegDBCreateKeyEx( szKey, "" );
  502.  
  503.         RegDBSetKeyValueEx( szKey, "Template", REGDB_STRING, "good.tpl", -1 );
  504.         RegDBSetKeyValueEx( szKey, "TemplatePath", REGDB_STRING, svMainDirectory ^ "TEMPLATE", -1 );
  505.         RegDBSetKeyValueEx( szKey, "x",  REGDB_NUMBER, "2", -1 );
  506.         RegDBSetKeyValueEx( szKey, "y",  REGDB_NUMBER, "3", -1 );
  507.         RegDBSetKeyValueEx( szKey, "dx", REGDB_NUMBER, "637", -1 );
  508.         RegDBSetKeyValueEx( szKey, "dy", REGDB_NUMBER, "448", -1 );
  509.         RegDBSetKeyValueEx( szKey, "LargeDraw", REGDB_NUMBER, "1", -1 );
  510.         RegDBSetKeyValueEx( szKey, "PopupMenu", REGDB_NUMBER, "1", -1 );
  511.         RegDBSetKeyValueEx( szKey, "NoPopup", REGDB_NUMBER, "1", -1 );
  512.         RegDBSetKeyValueEx( szKey, "StartDialogValue", REGDB_NUMBER, "111", -1 );
  513.         RegDBSetKeyValueEx( szKey, "TimeVisible", REGDB_NUMBER, "0", -1 );
  514.  
  515.         if (bIncludeSamples) then
  516.            // Create "DEMOS" key.
  517.            szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  518.                    PRODUCT_VERSION + "\\" + "DEMOS";
  519.            RegDBCreateKeyEx( szKey, "" );
  520.  
  521.            szDemo    = svMainDirectory ^ "SAMPLES\\TOUR.DBD";
  522.            szProgram = svMainDirectory ^ "PROGRAM\\DEMO32.EXE";
  523.            RegDBSetKeyValueEx( szKey, "path0", REGDB_STRING, szDemo, -1 );
  524.  
  525.            szDemo    = svMainDirectory ^ "SAMPLES\\2MINUTE.DBD";
  526.            RegDBSetKeyValueEx( szKey, "path1", REGDB_STRING, szDemo, -1 );
  527.            RegDBSetKeyValueEx( szKey, "tour",  REGDB_STRING, szDemo, -1 );
  528.  
  529.            RegDBSetKeyValueEx( szKey, "exe",    REGDB_STRING, szProgram, -1 );
  530.            RegDBSetKeyValueEx( szKey, "active", REGDB_STRING, "Play", -1 );
  531.  
  532.         endif;
  533.  
  534.         // Create "HELPMENU" key.
  535.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  536.                 PRODUCT_VERSION + "\\" + "HELPMENU";
  537.         RegDBCreateKeyEx( szKey, "" );
  538.  
  539.         RegDBSetKeyValueEx( szKey, "MaxNum", REGDB_NUMBER, "1", -1 );
  540.  
  541.         RegDBSetKeyValueEx( szKey, "path0", REGDB_STRING, svMainDirectory ^ "README.TXT", -1 );
  542.         RegDBSetKeyValueEx( szKey, "exe0", REGDB_STRING, "NOTEPAD.EXE", -1 );
  543.         RegDBSetKeyValueEx( szKey, "active0", REGDB_STRING, "Read Me", -1 );
  544.  
  545.         // Create "MRU" key.
  546.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  547.                 PRODUCT_VERSION + "\\" + "MRU";
  548.         RegDBCreateKeyEx( szKey, "" );
  549.  
  550.         szDemo = svMainDirectory ^ "SAMPLES\\2MINUTE.DBD";
  551.         RegDBSetKeyValueEx( szKey, "path0", REGDB_STRING, szDemo, -1 );
  552.  
  553.         // Create "SceneEditor" key.
  554.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  555.                 PRODUCT_VERSION + "\\" + "SceneEditor";
  556.         RegDBCreateKeyEx( szKey, "" );
  557.  
  558.         RegDBSetKeyValueEx( szKey, "x",  REGDB_NUMBER, "453", -1 );
  559.         RegDBSetKeyValueEx( szKey, "y",  REGDB_NUMBER, "2", -1 );
  560.         RegDBSetKeyValueEx( szKey, "Visible",  REGDB_NUMBER, "1", -1 );
  561.  
  562.         // Create "ToolPalette" key.
  563.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  564.                 PRODUCT_VERSION + "\\" + "ToolPalette";
  565.         RegDBCreateKeyEx( szKey, "" );
  566.  
  567.         RegDBSetKeyValueEx( szKey, "x",  REGDB_NUMBER, "509", -1 );
  568.         RegDBSetKeyValueEx( szKey, "y",  REGDB_NUMBER, "155", -1 );
  569.         RegDBSetKeyValueEx( szKey, "Visible",  REGDB_NUMBER, "1", -1 );
  570.  
  571.         // Create "AlignPalette" key.
  572.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  573.                 PRODUCT_VERSION + "\\" + "AlignPalette";
  574.         RegDBCreateKeyEx( szKey, "" );
  575.  
  576.         RegDBSetKeyValueEx( szKey, "Visible",  REGDB_NUMBER, "0", -1 );
  577.  
  578.         // Create "Controller" key.
  579.         szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
  580.                 PRODUCT_VERSION + "\\" + "Controller";
  581.         RegDBCreateKeyEx( szKey, "" );
  582.  
  583.         RegDBSetKeyValueEx( szKey, "x",  REGDB_NUMBER, "420", -1 );
  584.         RegDBSetKeyValueEx( szKey, "y",  REGDB_NUMBER, "231", -1 );
  585.         RegDBSetKeyValueEx( szKey, "Visible",  REGDB_NUMBER, "1", -1 );
  586.  
  587. end;
  588.  
  589.